app.service("brandService", function ($http) {
    //查询
    this.search = function (pageIndex, pageSize, searchEntity) {
        return $http.post("../brand/searchBrand.do?pageIndex=" + pageIndex + "&pageSize=" + pageSize, searchEntity);
    }
    //按ID查询
    this.getBrand = function (id) {
        return $http.get("../brand/getBrand.do?id=" + id);
    }
    //添加
    this.add = function (entity) {
        return $http.post("../brand/addBrand.do", entity);
    }
    //修改
    this.update = function (entity) {
        return $http.post("../brand/updateBrand.do", entity);
    }
    //删除
    this.delBrand = function (selectIds) {
        return $http.get("../brand/delBrand.do?ids=" + selectIds);
    }
    //获取品牌下拉列表数据
    this.selectOptionList = function () {
        return $http.get("../brand/selectOptionList.do");
    }
});